Savory is library for building user interface.
Core Concept
There are two main types in Savory, Views and Elements. View types produce static HTML nodes, while Element types produce dynamic HTML nodes, as simple as that.
View types
View types implements View
trait, this trait have one method that
generate the resulted HTML nodes, here is simple example:
# use *;
;
Element types
Element types implements Element
trait, most of the time elements have
logic inside them, they commonly carry their state inside them, and since
Savory follow Elm style we need message type and lastly we need config type
that is used to config the element on it's initialization, here is simple
example:
# use *;
// Element module
;
This example shows how to wirte counter element, so you can write your own elements.
Ecosystem
savory
(this crate) - Core library for building user interfacesavory-router
- Savory Router used to generate router for your appsavory-style
- Typed CSS style for Savorysavory-elements
- Collection of UI elements based on Savorysavory-elements-derive
- Crate that provideElement
derive